<template>
	<NavBar :obj="{ title: title, color: '#000', backgroundColor: '#fff' }" />
	<view class="container">
		<view class="main">
			<view class="main_li" @click="goUrl('/pages/user/set/method?type=' + item.type)" v-for="(item, index) in list" :key="index">
				{{ item.title }}
				<u-icon name="arrow-right" color="#888" size="16"></u-icon>
			</view>
		</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import { port, goUrl, hint } from '/service/port';
	import { onShow,onLoad } from '@dcloudio/uni-app';

	const list = ref([]);
	const title = ref('');
	onLoad((e) => {
		title.value = e.title;
	});
	onShow(() => {
		getMethodList();
	});

	async function getMethodList() {
		let res = await port('getMethodList');
		list.value = res.data;
	}
</script>

<style scoped lang="scss">
	:global(page) {
		background-color: #f4f5f8;
	}
	.container {
		margin: 0 30upx;
		.main {
			background: #fff;
			border-radius: 20upx;
			margin-top: 30upx;
			.main_li {
				color: #000;
				font-size: 28upx;
				display: flex;
				justify-content: space-between;
				line-height: 100upx;
				border-bottom: 1rpx solid #eee;
				&:last-child {
					border-bottom: none;
				}
				view {
					color: #888;
					display: flex;
				}
			}
		}
	}
</style>
